(1) Field of the Invention
The present invention relates to a microcontroller including an information exchange system. More particularly, the present invention pertains to an information exchange system that allows an external device to access the entire memory space of a microcontroller.
(2) Description of the Related Art
Sophisticated control systems typically use microcontrollers for controlling various features of these systems. Microcontrollers generally execute instruction from a memory located either on-board or off-board. For example, vehicle control systems can incorporate a microcontroller for controlling different functions of a car, such as the braking system of that car. Suppose that a certain function of the microcontroller, related to the braking system, may not be performing properly. In this case is would be difficult to accurately determine the reason causing the microcontroller not to perform according to the specification, by looking at the memory accessed by the microcontroller while code is executed out of this memory. Interrupting the microcontroller from the execution of code resident in the internal memory, for the purpose of accessing the internal memory, would not be desirable because such action would prevent the microcontroller from performing what is required to do. Consequently, a reading of a certain portion of the memory responsible for storing data in connection to the feature that is malfunctioning, while the microcontroller is accessing that portion of memory, would not be accurate.
FIG. 1 illustrates in block diagram form a circuit 10 for exchanging information between an external device 12 and the memory 16 which contains information accessed by a central processing unit (CPU) 18 of a microcontroller. In this configuration a dual port RAM 14 is used for exchanging information between the memory 16 and the external device 12. As one can see, the dual port RAM has one port connected to the microcontroller and another port connected to the external device. This implementation is expensive because it would require more transistors per cell in the arbitration logic. Another undesirable aspect of this implementation is that the parallel interface requires additional pins due to the increased number of address and data buses required. The increased number of pin increases the external noise affecting the circuit thereby degrading the performance and reliability of this circuit. Another disadvantage of the circuit in FIG. 1 is that the pins of the address/data bus may normally be used as digital input/output in the system. It is then necessary to implement these pins in external hardware when the dual port RAM is used.
It is, thus, desirable to provide an apparatus and method for monitoring and modifying the internal memory of a microcontroller without interrupting the microcontroller during its access to the internal memory. It is also desirable that such method and apparatus do not require the use of an expensive dual port RAM or of an emulator.